<link rel="stylesheet" type="text/css" href="../../stylesheet/inviter.css"/>

<?php echo $header; ?>
<div id="content">
    
<div id="inviter">
<div id="inviterheader"><?php echo $text_davet; ?></div>
<div id="topmenu">

<a class="but_ton black" href='https://accounts.google.com/o/oauth2/auth?client_id=742523455277.apps.googleusercontent.com&redirect_uri=<?php echo $gmailurl ?>&scope=https://www.google.com/m8/feeds/&response_type=code'><?php echo $text_gmaillink; ?></a> 

</div><form  name="mailsender" id="mailsender">
<div id="left">

<div id="TextBoxesGroup"  >

	<div id="TextBoxDiv1">
		<label>Mail Adresi # 1 : </label><input type='text' id='textbox[1]'/ >
	</div>
</div>

<input type='button' value='Mail adresi ekle' id='addButton'>
<!--
<input type='button' value='Remove Button' id='removeButton'>
<input type='button' value='Get TextBox Value' id='getButtonValue'>
-->
<div id="result"></div>
</div>

<div id="right">
  <label for="message"></label>
  <textarea name="message" id="message"  rows="5" style="width:100%" ><?php echo $text_messagetext ?></textarea>
<input name="Button" type="button" value="Mail Gönder" onclick="SendMail()" />
</div>
</form>

</div>

</div>

<?php echo $footer; ?>
<script type="text/javascript">
function SendMail() {
	/*alert($('#mailsender').serialize());
	
	alert('ok');
	$.ajax({
		url: 'index.php?route=checkout/cart/update',
		type: 'post',
		data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
		dataType: 'json',
	
	*/
	
   $.ajax({
   type: 'POST',
   url: 'index.php?route=inviter/postbackmail/sendmail',
   data: $('#mailsender').serialize(),
   beforeSend : function(yukleniyor) {
        $('#epostalistediv').html('<div align="center"><img src="yukleniyor.gif" /></div>');
        },
   success: function(ajaxCevap) {
        $('#epostalistediv').html(ajaxCevap);
        }
		
   });
   
}
</script>
<!--

<div id='TextBoxesGroup'>
 <div id="TextBoxDiv1">
  <TR>
  <TD>
  <input type='textbox' id='textbox1' >
  </TD>
  <TD>
  <input type="text" name="textbox' + counter +'" id="textbox' + counter + '" value="" >
  </TD>
  &nbsp;<TD><a href="#" value="addButton" class="addButton">Add</a>&nbsp;<a href="#" value="removeButton" class="removeButton">Remove</a></TD></TR>
 </div>
</div>

-->
